package org.coco.cloud.product.service.impl;

import org.coco.cloud.product.bean.Product;
import org.coco.cloud.product.service.ProductService;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.concurrent.TimeUnit;

/**
 * @Description
 * @Author fengleifl-hzgs
 * @Date 2025/1/19
 * @since
 */
@Service
public class ProductServiceImpl implements ProductService {
    @Override
    public Product getProduceById(Long productId) {
        Product product= new Product();
        product.setId(productId);
        product.setPrice(new BigDecimal(99));
        product.setProductName("apple-"+productId);
        product.setNum(2);

//        try {
//            TimeUnit.SECONDS.sleep(100);
//        } catch (InterruptedException e) {
//            throw new RuntimeException(e);
//        }

        return product;
    }
}
